/**
 * 
 */
package com.oraking.android.jquery.korealaw.util;

import java.util.ArrayList;
import java.util.Hashtable;

/**
 * 파일명          : CmmHttpUtil.java 
 * 작성일          : 2011. 10. 2.
 * 작성자          : <a href='http://oraking.springnote.com/' target='_blank'>Teddy</a>
 * Todo      :
 * 수정내용
 * -------------------------------------------------------------
 *      수정일      |      수정자      |              수정내용              
 * -------------------------------------------------------------
 *              |              |
 */

public class CmmHttpUtil {
	public static ArrayList<Hashtable<String, String>> parseURL(String url){
		ArrayList<Hashtable<String, String>> list = new ArrayList<Hashtable<String, String>>();
		Hashtable<String, String> hashTable;
		if(url != null && url.length() > 0){
			int start = url.indexOf("?");
			String tmp_Url = url.substring(start);
			String [] param = tmp_Url.split("&");
			for(String str : param){
				hashTable = new Hashtable<String, String>();
				String [] data = str.split("=");
				hashTable.put("key", data[0].toString());
				hashTable.put("value", data[1].toString());
				list.add(hashTable);
			}
		}
		return list;
	}
}
